-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add regtest to btcwallet #975
Conversation
fe97fbe
to
67a81ad
Compare
Could you help approve CI @yyforyongyu 🙏 |
67a81ad
to
60aebe9
Compare
Approved CI run. |
The linter is throwing an error about tagalign which I don't quite get. Error: cmd/sweepaccount/main.go:46:44: tag is not aligned, should be: description:"Use the regression bitcoin network" long:"regtest" (tagalign)
RegressionNet bool `long:"regtest" description:"Use the regression bitcoin network"` Interestingly, the other lines follow the same format, yet the linter only complains about this. I wonder if this has any connection with this comment?. I would look into it deeper and see what I will find. |
Hmm, I've never seen that linter error before. Only seems to mean the formatting of the tags, which looks okay to me. |
7d97082
to
be21cd7
Compare
I disabled config.go:100: the line is 205 characters long, which exceeds the maximum of 120 characters. (lll)
LegacyRPCListeners []string `long:"rpclisten" description:"Listen for legacy RPC connections on this interface/port (default port: 8332, testnet: 18332, simnet: 18554, regtest: 18332)"` Fixed that by adding |
thx man! you are my hero!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I wonder if there's a way to test it?
In this commit, we add checks to set the right settings when the user is on regtest.
In this commit we disable tagalign and turn off lll lint on config struct
be21cd7
to
676c400
Compare
Are you specifically referring to writing tests for regtest? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you specifically referring to writing tests for regtest?
More like testing the config validations are applied, but it's minor. As for the regtest, I think it's missing an integration test framework (sth like itest
used in lnd
), which I will write about it.
Alright, I'm looking forward to what you'll write then. Also what next steps would you recommend I take to move this PR forward? |
Think we just need another reviewer🤓 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, LGTM 🎉
closes #955
Following up on the comment, In this PR we add
regtest
support to btcwallet.A regtest environment can benefit users who want to test their applications or programs. Specifically, I am working on a project to add BTCD support in Polar, which depends on this, as all other node implementations operate on regtest. This becomes a blocker as highlighted in this comment:
Steps to test
btcwallet
on regtestYou can access
btcwallet
using the default port, which is set as18332
.